package mianshi.pattern.singleton;

public class LazyInnerClassSingleton {

    private LazyInnerClassSingleton() {
        if (LazyHolder.lazy !=  null) {
            throw new RuntimeException("已初始化！");
        }
    }

    public static final LazyInnerClassSingleton getInstance() {
        return LazyHolder.lazy;
    }

    private static final class LazyHolder {
        private static final LazyInnerClassSingleton lazy = new LazyInnerClassSingleton();
    }

}
